Re^3: SQLite: INSERT into a unique column and retrieve rowid I don't understand your comment about the state hash. I copied this subroutine into my actual program, which calls insert_unique() repeatedly for six different tables, and it worked correctly....